<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <div v-if="age>30">
            {{ name }}
        </div>
        <!-- <div v-else-if="age == 30">
            {{ name2 }}
        </div> -->
        <div v-else>
            {{ name1 }}
        </div>


        <hr>
        hello
        <div class="info">
            <p v-if="a.text"> {{a.text}}</p>
        </div>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        var vm = new Vue({
            el: "#app",
            data() {
                return {
                    name: "王五",
                    name1: "李四",
                    // name2: "张三",
                    age: 30,
                    // a: { text: '周六了' },
                    a: {},
                };
            }
        });
    </script>
</body>

</html>